package com.liuxinlong.common;

import java.util.ArrayList;
import java.util.List;

import lombok.Data;

/**
 * 通用树模型
 * 
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2021-12-31
 */
@Data
public class TreeNode {
	protected String id;
	protected String key;
	protected String parentId;
	protected String name;
	protected String value;
	protected String label;
	protected String title;
	protected boolean isLeaf;
	protected String other;
	protected String paramOne;
	protected List<TreeNode> children = new ArrayList<>();

	public void add(TreeNode node) {
		children.add(node);
	}

	public boolean getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(boolean isLeaf) {
		this.isLeaf = isLeaf;
	}
}
